﻿using Medlcalcare.MVC.Models;
using System.Collections.Concurrent;

namespace Medlcalcare.MVC.Services
{
    public class ChatSessionService : IChatSessionService
    {
        private readonly ConcurrentDictionary<string, ChatSession> _sessions = new();
        public ChatSession GetOrCreateSession(string sessionId)
        {
            return _sessions.GetOrAdd(sessionId, id => new ChatSession(id));
        }
    }
}
